<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="menu/swimbi.css" />
<link rel="stylesheet" href="position/positionTable.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JT HR</title>
<style>
.edit {
	background: url();
	width: 32px;
	height: 32px;
	border: none;
}

.edit:hover{
	opacity: 0.8;
}

.edit:active{
	opacity: 0.6;
}

.view {
	background: url();
	width: 32px;
	height: 32px;
	border: none;
}

.view:hover{
	opacity: 0.5;
}

.view:active{
	opacity: 0.3;
}

.delete {
	background: url();
	width: 26px;
	height: 32px;
	border: none;
	margin-left: 5px;
}

.delete:hover{
	opacity: 0.8;
}

.delete:active{
	opacity: 0.6;
}

tr:hover {
    background-color: #8b2d4b;   
}

</style>
</head>
<body>
	<div id="main">
		<%@ include file="header.jsp"%>
		<%@ include file="menu.jsp"%>
		
		<div id="site_content">
			<div id="table_container">
				<div class="CSSTable">
					<form action="user" method="POST">
						<table>
							<tr>
								<td>First Name</td>
								<td>Last Name</td>
								<td>Phone Number</td>
								<td>Mobile Number</td>
								<td>E-mail</td>
								<td>Job Position</td>
								<td>Description</td>
								<td>Operations</td>
							</tr>
							<c:forEach items="${list}" var="user">
								<tr>
									<td><c:out value="${user.firstName}"></c:out></td>
									<td><c:out value="${user.lastName}" /></td>
									<td><c:out value="${user.phoneNumber}" /></td>
									<td><c:out value="${user.mobilePhoneNumber}"></c:out></td>
									<td><c:out value="${user.email}"></c:out></td>
									<td><c:out value="${user.function}"></c:out></td>
									<td><c:out value="${user.description}"></c:out></td>
									<td>
										<div style="text-align:center;">
										<form action="user" method="POST">
											<input type="hidden" name="user_id" value="<c:out value="${user.id}" />"/>
											<input type="submit" class="view" name="viewUser" value=""  title="View" />
											<input type="submit" class="edit" name="editUser" value="" title="Edit">
											<input type="submit" class="delete" name="deleteUser" value="" title="Delete" onclick="return confirm('Are you sure you want to delete?')">
										</form>
										</div>
									</td>
								</tr>
							</c:forEach>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>